home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / 0utils.lha / 0Utils / SRun.data < prev    next >
Text File  |  1995-09-05  |  2KB  |  88 lines

  1.  
  2. #ifdef TPLTER
  3.  
  4. SRun = {
  5.  
  6.     SHORT = {{ run a program synchroneously }};
  7.  
  8.     DESCRIPTION = {{
  9.     Run a command synchroneously (usable e.g. to
  10.     redirect a script)
  11.  
  12.     This simple program does not more than
  13.     call 'SystemTags' with its arguments.
  14.     U wanna know the purpose of such a program?
  15.     Have U ever tried to redirect the output
  16.     of a Dos script? No chance!
  17.     > echo "echo Hallo" | execute > t:t in:
  18.     "Hallo"
  19.     in fact execute does _not_ take any respect
  20.     of any I/O redirections (it seems like this
  21.     in caused by the fact, that "Execute" itself
  22.     is part of the Shell). The solution would
  23.     have been usage of "Run" since that command
  24.     spawns a new process, whose stdio channels
  25.     can be redirected. But what happenes, if we
  26.     can not use a asynchroneous process? (e.g.
  27.     cause we wanna use the normal console input)
  28.     Now, that is the purpose of "SRun".
  29.  
  30.      RESULT
  31.     STDOUT: the output of the 'command' execution.
  32.     RC:    returnvalue of SystemTags() or >=10
  33.     }};
  34.  
  35.     NOTES = {{
  36.     SRun* does currently ignore ReadArgs, this is due
  37.     to a bug(?) in readargs that removes some whitespace
  38.     and quotes from argstring even with /F option
  39.     }};
  40.  
  41.     //BUGS = {{
  42.     //      "SRun COMMAND commandstring" fails; U _MUST_ use
  43.     //      "SRun commandstring"
  44.     //}};
  45.  
  46.     EXAMPLES = {{
  47.     >SRun echo hallo
  48.     "hallo"
  49.     }};
  50.  
  51.  
  52.     HISTORY = {{
  53.     20-02-95 b_noll created
  54.     21-02-95 b_noll added version/format-prefix/offset
  55.     20-03-95 b_noll added args diagnostics
  56.     09-04-95 b_noll shortened the file: arg Parsing dropped, removed NP_tags
  57.     19-08-95 b_noll created .data file
  58.     }};
  59.  
  60.  
  61.     includes = { "<dos/dostags.h>" };
  62.  
  63.  
  64.     Template = "/F/A";
  65.     Arguments = {{
  66.     STRPTR command;
  67.     }};
  68.  
  69.     version = "1.2";
  70.  
  71.     body = {{
  72. //      STRPTR template = FORMATPREFIX FORMAT;
  73.  
  74.  
  75.     retval = SystemTagList (GetArgStr(), NULL);
  76.         //TAG_IGNORE,     template,
  77.         //TAG_END);
  78.  
  79.     if (retval == -1) {
  80.         retval = RETURN_ERROR;
  81.     } /* if */
  82.  
  83.     }};
  84. };
  85.  
  86. #endif
  87.  
  88.